package com.zswl.bus;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

/**
 * Created by Administrator on 2018/6/30 0030.
 */

public interface Api {
//    String HOST_BASE = "http://w.dagongbus.com/weipin/";
    String HOST_BASE = "http://w.dagongbus.com/weipin/";
//        String HOST_BASE = "http://192.168.2.101:8080/weipin/";
    String HOST = HOST_BASE + "mendian/";
    String LOGIN = HOST_BASE + "mendian/index?uid=%s";


    /**
     * 修改用户头像
     *
     * @param img
     * @return
     */
    @Multipart
    @POST("uploadImg")
    Observable<String> uploadHeadImg(@Part MultipartBody.Part img);

    /**
     * 用户登录
     *
     * @param phone
     * @param password
     * @return
     */
    @FormUrlEncoded
    @POST("loginValidate")
    Observable<String> userLogin(@Field("phone") String phone,
                                 @Field("password") String password);


}
